//
//  Weibo.m
//  YouHui
//
//  Created by  on 11-12-23.
//  Copyright (c) 2011年 netease. All rights reserved.
//

#import "ShareKit.h"

@implementation ShareKitUrl

+(NSString*)requestTokenURL:(NSString*)type {
    if (type==SHARE_SINAWEIBO) {
        return @"http://api.t.sina.com.cn/oauth/request_token";
    } else if (type==SHARE_NTESWEIBO) {
        return @"http://api.t.163.com/oauth/request_token";
    } else if (type==SHARE_QQWEIBO) {
        return @"https://open.t.qq.com/cgi-bin/request_token";
    }

    return nil;
}

+(NSString*)accessTokenURL:(NSString*)type {
    if (type==SHARE_SINAWEIBO) {
        return @"http://api.t.sina.com.cn/oauth/access_token";
    } else if (type==SHARE_NTESWEIBO) {
        return @"http://api.t.163.com/oauth/access_token";
    } else if (type==SHARE_QQWEIBO) {
        return @"https://open.t.qq.com/cgi-bin/access_token";
    }
    return nil;
}

+(NSString*)authorizeURL:(NSString*)type {
    if (type==SHARE_SINAWEIBO) {
        return @"http://api.t.sina.com.cn/oauth/authorize";
    } else if (type==SHARE_NTESWEIBO) {
        return @"http://api.t.163.com/oauth/authorize?client_type=mobile";
    } else if (type==SHARE_QQWEIBO) {
        return @"https://open.t.qq.com/cgi-bin/authorize";
    }
    return nil;
}

+(NSString*)postURL:(NSString*)type {
    if (type==SHARE_SINAWEIBO) {
        return @"http://api.t.sina.com.cn/statuses/update.json";
    } else if (type==SHARE_NTESWEIBO) {
        return @"http://api.t.163.com/statuses/update.json";
    } else if (type==SHARE_QQWEIBO) {
        return @"http://open.t.qq.com/api/t/add";
    }
    return nil;
}

+(NSString*)uploadURL:(NSString*)type {
    if (type==SHARE_SINAWEIBO) {
        return @"http://api.t.sina.com.cn/statuses/upload.json";
    } else if (type==SHARE_NTESWEIBO) {
        return @"http://api.t.163.com/statuses/upload.json";
    } else if (type==SHARE_QQWEIBO) {
        return @"http://open.t.qq.com/api/t/add_pic";
    }
    return nil;    
}

@end